home *** CD-ROM | disk | FTP | other *** search
/ GameStar Special 2004 September / GSSH0904CD1.iso / RiseofNations / RedFront / RedFront.exe / Red Front / Red Front - 03 - Kiev.bhs < prev    next >
Text File  |  2004-01-19  |  38KB  |  1,152 lines

  1. /* Red Front
  2.    Kiev
  3.    
  4.    These events will control the Kiev scenario for the Red Front campaign.
  5.   
  6.    Campaign By: Kevin 'DarthVeda' Chulski
  7.    Contact: darthveda@hotmail.com
  8.    Please email any questions/suggestions/comments that you have!   
  9. */
  10.  
  11.   
  12. scenario
  13. {
  14.  
  15.   set_nation_name("Russians", $S("Red Army"));
  16.   set_nation_name("Romans", $S("Germans"));
  17.  
  18.   // initialize variables
  19.   
  20.   static int wagons_saved = 0;
  21.   static int forts_visited = 0;
  22.   static int initial_vic = 25;
  23.   static int time_ran_out = 0;
  24.  
  25. labels {
  26.   //Add any constant labels here in a comma separated list.
  27.   
  28. }
  29.  
  30. run_once {
  31.   //Insert commands that should be executed only once when the script is loaded here.
  32.   
  33.   //disable weird things
  34.   
  35.   disable_type("Helicopter");
  36.   disable_type("Nuclear Missile");
  37.   disable_type("Spy");
  38.   
  39.   disable_type("Supply Wagon");
  40.   
  41.   disable_tech(3, "Allegiance");
  42.   disable_tech(3, "Computerization");
  43.   set_music_mood("losing", true);
  44.   
  45.   // disable wonders
  46.   
  47.   disable_type( "Pyramids" );
  48.   disable_type( "Colossus" );
  49.   disable_type( "Terra Cotta Army" );
  50.   disable_type( "Colosseum" );
  51.   disable_type( "Temple of Tikal" );
  52.   disable_type( "Porcelain Tower" );
  53.   disable_type( "Angkor Wat" );
  54.   disable_type( "Versailles" );
  55.   disable_type( "Statue of Liberty" );
  56.   disable_type( "Kremlin" );
  57.   disable_type( "Taj Mahal" );
  58.   disable_type( "Eiffel Tower" );
  59.   disable_type( "Supercollider" );
  60.   disable_type( "Space Program" );
  61.   
  62.   // disable certain buildings and people
  63.   
  64.   disable_type( "Fishermen" );
  65.   disable_type( "Scholar" );
  66.   disable_type( "Small City" );
  67.   disable_type( "University" );
  68.   disable_type( "Library" );
  69.   
  70.   // disable ships
  71.   
  72.   disable_type("Submarine");
  73.   disable_type("Dreadnought");
  74.   disable_type("Destroyer");
  75.   
  76.   // set timers
  77.   
  78.   set_timer("packinfo",10); // tell player how to pack a factory
  79.   set_timer("generalquest", 120);
  80.   
  81.   set_timer("western",180); // western attack timer
  82.   set_timer("eastern",300); // eastern attack timer
  83.   set_timer("times_up_for_industry",300);
  84.   
  85.   // disable triggers
  86.   
  87.     disable_trigger( "fort1" );
  88.     disable_trigger( "fort2" );
  89.     disable_trigger( "fort3" );
  90.     disable_trigger( "fort4" );
  91.     disable_trigger( "fort5" );
  92.     disable_trigger( "fort6" );
  93.     disable_trigger( "fort7" );
  94.     disable_trigger( "fort8" );
  95.     disable_trigger( "fort9" );
  96.     disable_trigger( "fort10" );
  97.     disable_trigger( "fort11" );
  98.     disable_trigger( "fort12" );
  99.     disable_trigger( "the_general_is_down" );
  100.     
  101.     disable_trigger( "attack_flood" );
  102.     disable_trigger( "the_overrun" );
  103.   
  104.   // blurb
  105.   
  106.   popup_dialog("August 1941 - The battle for Kiev has been raging for some time now, comrade General.  The situation is getting dangerous as we face a possible trapping maneuver from the Germans.  Since Kiev is in danger of falling, we will need to move its critical industries to the east.  Good luck, comrade General.");
  107.   popup_dialog("NEW OBJECTIVE: Pack 10 Factories and move them to the east.");
  108.   add_objective( "Pack 10 Factories and move them to the east", "move", "null.wav");
  109.   
  110. }
  111.  
  112. //Main script body.
  113. //Add triggers and other commands to be executed each game frame here.
  114. //Use Edit->Insert Trigger Function to select from the list of available functions
  115. //Use Edit->Insert Trigger Block to add a blank trigger block.
  116. //See ./scenario/sample_script.bhs for additional documentation
  117.  
  118.   // western attack
  119.   
  120.   trigger west_attack ( timer_expired( "western" ) )
  121.   {
  122.     
  123.     create_unit(6,7,342,"Infantry",3);
  124.     group_attack_to_order(6,191,204);
  125.     create_unit(7,7,342,"Heavy Machine Gun",1);
  126.     group_attack_to_order(7,191,204);
  127.     create_unit(7,7,342,"Howitzer",1);
  128.     group_attack_to_order(7,191,204);
  129.     create_unit(7,7,342,"Tank",1);
  130.     group_attack_to_order(7,191,204);
  131.     
  132.     set_timer( "western", 45 );
  133.     enable_trigger( "west_attack" );    
  134.   }
  135.   
  136.   trigger time_is_up_attack ( timer_expired( "times_up_for_industry" ) )
  137.   {
  138.     popup_dialog("Scouts report that the Germans are on the move and will soon be on the city outskirts in vast numbers.  Moscow has ordered you to delay the German advance to buy time for the defence of the capital.  Remember that you still must accomplish your other goals, commander.");
  139.     popup_dialog("NEW OBJECTIVE: Survive for 25 minutes.");
  140.     add_objective( "Survive for 25 minutes", "survive", "null.wav");
  141.        
  142.     time_ran_out = 1;
  143.     
  144.     set_timer( "victimer", 1200 );
  145.     set_timer( "vicupdater", 60 );
  146.     set_timer( "flood", 600 );
  147.     set_timer( "overrun", 900 );
  148.     enable_trigger( "attack_flood" );
  149.     enable_trigger( "the_overrun" );
  150.   }
  151.   
  152.   // western attack
  153.   
  154.   trigger east_attack ( timer_expired( "eastern" ) )
  155.   {
  156.         
  157.     create_unit(6,15,55,"Infantry",2);
  158.     group_attack_to_order(6,295,120);
  159.     create_unit(6,15,55,"Howitzer",1);
  160.     group_attack_to_order(6,295,120);
  161.     create_unit(6,15,55,"General",1);
  162.     group_attack_to_order(6,295,120);
  163.     create_unit(7,15,55,"Tank",2);
  164.     group_attack_to_order(7,295,120);
  165.     
  166.     set_timer( "eastern", 45 );
  167.     enable_trigger( "east_attack" );    
  168.   }
  169.   
  170.   // flood
  171.   
  172.   trigger attack_flood ( timer_expired( "flood" ) )
  173.   {
  174.     create_unit(6,382,73,"Infantry",2);
  175.     group_attack_to_order(6,191,204);
  176.     create_unit(6,382,73,"Howitzer",1);
  177.     group_attack_to_order(6,191,204);
  178.     create_unit(7,382,73,"Tank",3);
  179.     group_attack_to_order(7,191,204);
  180.     
  181.     set_timer( "flood", 40 );
  182.     enable_trigger( "attack_flood" ); 
  183.   }
  184.   
  185.   // overrun attack
  186.   
  187.   trigger the_overrun ( timer_expired( "overrun" ) )
  188.   {
  189.     create_unit(6,373,356,"Infantry",4);
  190.     group_attack_to_order(6,191,204);
  191.     create_unit(6,373,356,"Heavy Machine Gun",1);
  192.     group_attack_to_order(6,191,204);
  193.     create_unit(6,373,356,"Howitzer",2);
  194.     group_attack_to_order(6,191,204);
  195.     create_unit(7,373,356,"Tank",3);
  196.     group_attack_to_order(7,191,204);
  197.     
  198.     set_timer( "overrun", 25 );
  199.     enable_trigger( "the_overrun" );
  200.   }
  201.  
  202.   // enable the general_quest
  203.   
  204.   trigger general_quest ( timer_expired( "generalquest" ) )
  205.   {
  206.     popup_dialog("Comrade general, a very important leader has just arrived with us.  If we were to bring him to each of the 12 fortresses around the city, the morale of our troops might improve.");
  207.     create_unit(1,185,202,"Don Cossack",1);
  208.     move_camera(185,202);
  209.     popup_dialog("NEW OPTIONAL OBJECTIVE: Bring very important general to each fortress to receive a bonus.");
  210.     add_objective( "OPTIONAL: Bring general to 12 forts.", "forts", "null.wav" );
  211.     
  212.     // enable the triggers
  213.     enable_trigger( "fort1" );
  214.     enable_trigger( "fort2" );
  215.     enable_trigger( "fort3" );
  216.     enable_trigger( "fort4" );
  217.     enable_trigger( "fort5" );
  218.     enable_trigger( "fort6" );
  219.     enable_trigger( "fort7" );
  220.     enable_trigger( "fort8" );
  221.     enable_trigger( "fort9" );
  222.     enable_trigger( "fort10" );
  223.     enable_trigger( "fort11" );
  224.     enable_trigger( "fort12" );
  225.     enable_trigger( "the_general_is_down" );
  226.   }
  227.   
  228.   trigger the_general_is_down ( unit_type_killed(1,"Don Cossack") )
  229.   {
  230.     popup_dialog("This is terrible comrade general; the general has been killed!  Our troops morale has been dashed by this turn of events.  Fewer men are now willing to fight for the defense of Kiev!");
  231.     set_population_cap(1,100);
  232.     remove_objective( "forts" );
  233.   }
  234.   
  235.   trigger fort1 ( object_type_near(1,"Don Cossack",1,191,294,10) )
  236.   {
  237.     create_unit(1,198,297,"Red Guards Infantry",1);
  238.     ping(1,1,198,297);
  239.     forts_visited++;
  240.     add_flag(191,294);
  241.     if( forts_visited == 1 )
  242.     {
  243.     move_camera(191,294);
  244.     popup_dialog("Good work.  The General has raised the moral of the troops at this fortress.  It has been marked with a flag.");
  245.     change_objective_text("forts","OPTIONAL: Bring general to 11 forts.");
  246.     }
  247.     if( forts_visited == 2 )
  248.     {
  249.     change_objective_text("forts","OPTIONAL: Bring general to 10 forts.");
  250.     }
  251.     if( forts_visited == 3 )
  252.     {
  253.     change_objective_text("forts","OPTIONAL: Bring general to 9 forts.");
  254.     }
  255.     if( forts_visited == 4 )
  256.     {
  257.     change_objective_text("forts","OPTIONAL: Bring general to 8 forts.");
  258.     }
  259.     if( forts_visited == 5 )
  260.     {
  261.     change_objective_text("forts","OPTIONAL: Bring general to 7 forts.");
  262.     }
  263.     if( forts_visited == 6 )
  264.     {
  265.     change_objective_text("forts","OPTIONAL: Bring general to 6 forts.");
  266.     }
  267.     if( forts_visited == 7 )
  268.     {
  269.     change_objective_text("forts","OPTIONAL: Bring general to 5 forts.");
  270.     }
  271.     if( forts_visited == 8 )
  272.     {
  273.     change_objective_text("forts","OPTIONAL: Bring general to 4 forts.");
  274.     }
  275.     if( forts_visited == 9 )
  276.     {
  277.     change_objective_text("forts","OPTIONAL: Bring general to 3 forts.");
  278.     }
  279.     if( forts_visited == 10 )
  280.     {
  281.     change_objective_text("forts","OPTIONAL: Bring general to 2 forts.");
  282.     }
  283.     if( forts_visited == 11 )
  284.     {
  285.     change_objective_text("forts","OPTIONAL: Bring general to 1 more fort.");
  286.     }
  287.     if( forts_visited == 12 )
  288.     {
  289.       // all forts visited
  290.       disable_trigger( "the_general_is_down" );
  291.       objective_complete( "forts" );
  292.       popup_dialog("Comrade General, the troops have been amazed by the prowess of our General.  It has hightened the battlefield morale of all of our troops allowing us to build more units.");
  293.       gain_tech(1,"Nation-in-Arms");      
  294.     }
  295.   }
  296.   trigger fort2 ( object_type_near(1,"Don Cossack",1,132, 280,10) )
  297.   {
  298.     create_unit(1,140,283,"Red Guards Infantry",1);
  299.     ping(1,1,140,283);
  300.     forts_visited++;
  301.     add_flag(140,283);
  302.     if( forts_visited == 1 )
  303.     {
  304.     move_camera(140,283);
  305.     popup_dialog("Good work.  The General has raised the moral of the troops at this fortress.  It has been marked with a flag.");
  306.     change_objective_text("forts","OPTIONAL: Bring general to 11 forts.");
  307.     }
  308.     if( forts_visited == 2 )
  309.     {
  310.     change_objective_text("forts","OPTIONAL: Bring general to 10 forts.");
  311.     }
  312.     if( forts_visited == 3 )
  313.     {
  314.     change_objective_text("forts","OPTIONAL: Bring general to 9 forts.");
  315.     }
  316.     if( forts_visited == 4 )
  317.     {
  318.     change_objective_text("forts","OPTIONAL: Bring general to 8 forts.");
  319.     }
  320.     if( forts_visited == 5 )
  321.     {
  322.     change_objective_text("forts","OPTIONAL: Bring general to 7 forts.");
  323.     }
  324.     if( forts_visited == 6 )
  325.     {
  326.     change_objective_text("forts","OPTIONAL: Bring general to 6 forts.");
  327.     }
  328.     if( forts_visited == 7 )
  329.     {
  330.     change_objective_text("forts","OPTIONAL: Bring general to 5 forts.");
  331.     }
  332.     if( forts_visited == 8 )
  333.     {
  334.     change_objective_text("forts","OPTIONAL: Bring general to 4 forts.");
  335.     }
  336.     if( forts_visited == 9 )
  337.     {
  338.     change_objective_text("forts","OPTIONAL: Bring general to 3 forts.");
  339.     }
  340.     if( forts_visited == 10 )
  341.     {
  342.     change_objective_text("forts","OPTIONAL: Bring general to 2 forts.");
  343.     }
  344.     if( forts_visited == 11 )
  345.     {
  346.     change_objective_text("forts","OPTIONAL: Bring general to 1 more fort.");
  347.     }
  348.     if( forts_visited == 12 )
  349.     {
  350.       // all forts visited
  351.       disable_trigger( "the_general_is_down" );
  352.       objective_complete( "forts" );
  353.       popup_dialog("Comrade General, the troops have been amazed by the prowess of our General.  It has hightened the battlefield morale of all of our troops.");
  354.       gain_tech(1,"Nation-in-Arms");
  355.     }
  356.   }
  357.   trigger fort3 ( object_type_near(1,"Don Cossack",1, 100, 217,10) )
  358.   {
  359.     create_unit(1,107,220,"Red Guards Infantry",1);
  360.     ping(1,1,107,220);
  361.     forts_visited++;
  362.     add_flag(107,220);    
  363.     if( forts_visited == 1 )
  364.     {
  365.     move_camera(107,220);
  366.     popup_dialog("Good work.  The General has raised the moral of the troops at this fortress.  It has been marked with a flag.");
  367.     change_objective_text("forts","OPTIONAL: Bring general to 11 forts.");
  368.     }
  369.     if( forts_visited == 2 )
  370.     {
  371.     change_objective_text("forts","OPTIONAL: Bring general to 10 forts.");
  372.     }
  373.     if( forts_visited == 3 )
  374.     {
  375.     change_objective_text("forts","OPTIONAL: Bring general to 9 forts.");
  376.     }
  377.     if( forts_visited == 4 )
  378.     {
  379.     change_objective_text("forts","OPTIONAL: Bring general to 8 forts.");
  380.     }
  381.     if( forts_visited == 5 )
  382.     {
  383.     change_objective_text("forts","OPTIONAL: Bring general to 7 forts.");
  384.     }
  385.     if( forts_visited == 6 )
  386.     {
  387.     change_objective_text("forts","OPTIONAL: Bring general to 6 forts.");
  388.     }
  389.     if( forts_visited == 7 )
  390.     {
  391.     change_objective_text("forts","OPTIONAL: Bring general to 5 forts.");
  392.     }
  393.     if( forts_visited == 8 )
  394.     {
  395.     change_objective_text("forts","OPTIONAL: Bring general to 4 forts.");
  396.     }
  397.     if( forts_visited == 9 )
  398.     {
  399.     change_objective_text("forts","OPTIONAL: Bring general to 3 forts.");
  400.     }
  401.     if( forts_visited == 10 )
  402.     {
  403.     change_objective_text("forts","OPTIONAL: Bring general to 2 forts.");
  404.     }
  405.     if( forts_visited == 11 )
  406.     {
  407.     change_objective_text("forts","OPTIONAL: Bring general to 1 more fort.");
  408.     }
  409.     if( forts_visited == 12 )
  410.     {
  411.       // all forts visited
  412.       disable_trigger( "the_general_is_down" );
  413.       objective_complete( "forts" );
  414.       popup_dialog("Comrade General, the troops have been amazed by the prowess of our General.  It has hightened the battlefield morale of all of our troops.");
  415.       gain_tech(1,"Nation-in-Arms");
  416.     }
  417.   }
  418.   trigger fort4 ( object_type_near(1,"Don Cossack",1, 93, 132,10) )
  419.   {
  420.     create_unit(1,101,136,"Red Guards Infantry",1);
  421.     ping(1,1,101,136);
  422.     forts_visited++;
  423.     add_flag(101,136);
  424.     if( forts_visited == 1 )
  425.     {
  426.     move_camera(101,136);
  427.     popup_dialog("Good work.  The General has raised the moral of the troops at this fortress.  It has been marked with a flag.");
  428.     change_objective_text("forts","OPTIONAL: Bring general to 11 forts.");
  429.     }
  430.     if( forts_visited == 2 )
  431.     {
  432.     change_objective_text("forts","OPTIONAL: Bring general to 10 forts.");
  433.     }
  434.     if( forts_visited == 3 )
  435.     {
  436.     change_objective_text("forts","OPTIONAL: Bring general to 9 forts.");
  437.     }
  438.     if( forts_visited == 4 )
  439.     {
  440.     change_objective_text("forts","OPTIONAL: Bring general to 8 forts.");
  441.     }
  442.     if( forts_visited == 5 )
  443.     {
  444.     change_objective_text("forts","OPTIONAL: Bring general to 7 forts.");
  445.     }
  446.     if( forts_visited == 6 )
  447.     {
  448.     change_objective_text("forts","OPTIONAL: Bring general to 6 forts.");
  449.     }
  450.     if( forts_visited == 7 )
  451.     {
  452.     change_objective_text("forts","OPTIONAL: Bring general to 5 forts.");
  453.     }
  454.     if( forts_visited == 8 )
  455.     {
  456.     change_objective_text("forts","OPTIONAL: Bring general to 4 forts.");
  457.     }
  458.     if( forts_visited == 9 )
  459.     {
  460.     change_objective_text("forts","OPTIONAL: Bring general to 3 forts.");
  461.     }
  462.     if( forts_visited == 10 )
  463.     {
  464.     change_objective_text("forts","OPTIONAL: Bring general to 2 forts.");
  465.     }
  466.     if( forts_visited == 11 )
  467.     {
  468.     change_objective_text("forts","OPTIONAL: Bring general to 1 more fort.");
  469.     }
  470.     if( forts_visited == 12 )
  471.     {
  472.       // all forts visited
  473.       disable_trigger( "the_general_is_down" );
  474.       objective_complete( "forts" );
  475.       popup_dialog("Comrade General, the troops have been amazed by the prowess of our General.  It has hightened the battlefield morale of all of our troops.");
  476.       gain_tech(1,"Nation-in-Arms");
  477.     }
  478.   }
  479.   trigger fort5 ( object_type_near(1,"Don Cossack",1, 90, 98,10) )
  480.   {
  481.     create_unit(1,99,103,"Red Guards Infantry",1);
  482.     ping(1,1,99,103);
  483.     forts_visited++;
  484.     add_flag(99,103);
  485.     if( forts_visited == 1 )
  486.     {
  487.     move_camera(99,193);
  488.     popup_dialog("Good work.  The General has raised the moral of the troops at this fortress.  It has been marked with a flag.");
  489.     change_objective_text("forts","OPTIONAL: Bring general to 11 forts.");
  490.     }
  491.     if( forts_visited == 2 )
  492.     {
  493.     change_objective_text("forts","OPTIONAL: Bring general to 10 forts.");
  494.     }
  495.     if( forts_visited == 3 )
  496.     {
  497.     change_objective_text("forts","OPTIONAL: Bring general to 9 forts.");
  498.     }
  499.     if( forts_visited == 4 )
  500.     {
  501.     change_objective_text("forts","OPTIONAL: Bring general to 8 forts.");
  502.     }
  503.     if( forts_visited == 5 )
  504.     {
  505.     change_objective_text("forts","OPTIONAL: Bring general to 7 forts.");
  506.     }
  507.     if( forts_visited == 6 )
  508.     {
  509.     change_objective_text("forts","OPTIONAL: Bring general to 6 forts.");
  510.     }
  511.     if( forts_visited == 7 )
  512.     {
  513.     change_objective_text("forts","OPTIONAL: Bring general to 5 forts.");
  514.     }
  515.     if( forts_visited == 8 )
  516.     {
  517.     change_objective_text("forts","OPTIONAL: Bring general to 4 forts.");
  518.     }
  519.     if( forts_visited == 9 )
  520.     {
  521.     change_objective_text("forts","OPTIONAL: Bring general to 3 forts.");
  522.     }
  523.     if( forts_visited == 10 )
  524.     {
  525.     change_objective_text("forts","OPTIONAL: Bring general to 2 forts.");
  526.     }
  527.     if( forts_visited == 11 )
  528.     {
  529.     change_objective_text("forts","OPTIONAL: Bring general to 1 more fort.");
  530.     }
  531.     if( forts_visited == 12 )
  532.     {
  533.       // all forts visited
  534.       disable_trigger( "the_general_is_down" );
  535.       objective_complete( "forts" );
  536.       popup_dialog("Comrade General, the troops have been amazed by the prowess of our General.  It has hightened the battlefield morale of all of our troops.");
  537.       gain_tech(1,"Nation-in-Arms");
  538.     }
  539.   }
  540.   trigger fort6 ( object_type_near(1,"Don Cossack",1, 156, 52,10) )
  541.   {
  542.     create_unit(1,164,55,"Red Guards Infantry",1);
  543.     ping(1,1,164,55);
  544.     forts_visited++;
  545.     add_flag(164,55);
  546.     if( forts_visited == 1 )
  547.     {
  548.     move_camera(164,55);
  549.     popup_dialog("Good work.  The General has raised the moral of the troops at this fortress.  It has been marked with a flag.");
  550.     change_objective_text("forts","OPTIONAL: Bring general to 11 forts.");
  551.     }
  552.     if( forts_visited == 2 )
  553.     {
  554.     change_objective_text("forts","OPTIONAL: Bring general to 10 forts.");
  555.     }
  556.     if( forts_visited == 3 )
  557.     {
  558.     change_objective_text("forts","OPTIONAL: Bring general to 9 forts.");
  559.     }
  560.     if( forts_visited == 4 )
  561.     {
  562.     change_objective_text("forts","OPTIONAL: Bring general to 8 forts.");
  563.     }
  564.     if( forts_visited == 5 )
  565.     {
  566.     change_objective_text("forts","OPTIONAL: Bring general to 7 forts.");
  567.     }
  568.     if( forts_visited == 6 )
  569.     {
  570.     change_objective_text("forts","OPTIONAL: Bring general to 6 forts.");
  571.     }
  572.     if( forts_visited == 7 )
  573.     {
  574.     change_objective_text("forts","OPTIONAL: Bring general to 5 forts.");
  575.     }
  576.     if( forts_visited == 8 )
  577.     {
  578.     change_objective_text("forts","OPTIONAL: Bring general to 4 forts.");
  579.     }
  580.     if( forts_visited == 9 )
  581.     {
  582.     change_objective_text("forts","OPTIONAL: Bring general to 3 forts.");
  583.     }
  584.     if( forts_visited == 10 )
  585.     {
  586.     change_objective_text("forts","OPTIONAL: Bring general to 2 forts.");
  587.     }
  588.     if( forts_visited == 11 )
  589.     {
  590.     change_objective_text("forts","OPTIONAL: Bring general to 1 more fort.");
  591.     }
  592.     if( forts_visited == 12 )
  593.     {
  594.       // all forts visited
  595.       disable_trigger( "the_general_is_down" );
  596.       objective_complete( "forts" );
  597.       popup_dialog("Comrade General, the troops have been amazed by the prowess of our General.  It has hightened the battlefield morale of all of our troops.");
  598.       gain_tech(1,"Nation-in-Arms");
  599.     }
  600.   }
  601.   trigger fort7 ( object_type_near(1,"Don Cossack",1, 200, 84,10) )
  602.   {
  603.     create_unit(1,211,90,"Red Guards Infantry",1);
  604.     ping(1,1,211,90);
  605.     forts_visited++;
  606.     add_flag(211,90);
  607.     if( forts_visited == 1 )
  608.     {
  609.     move_camera(211,90);
  610.     popup_dialog("Good work.  The General has raised the moral of the troops at this fortress.  It has been marked with a flag.");
  611.     change_objective_text("forts","OPTIONAL: Bring general to 11 forts.");
  612.     }
  613.     if( forts_visited == 2 )
  614.     {
  615.     change_objective_text("forts","OPTIONAL: Bring general to 10 forts.");
  616.     }
  617.     if( forts_visited == 3 )
  618.     {
  619.     change_objective_text("forts","OPTIONAL: Bring general to 9 forts.");
  620.     }
  621.     if( forts_visited == 4 )
  622.     {
  623.     change_objective_text("forts","OPTIONAL: Bring general to 8 forts.");
  624.     }
  625.     if( forts_visited == 5 )
  626.     {
  627.     change_objective_text("forts","OPTIONAL: Bring general to 7 forts.");
  628.     }
  629.     if( forts_visited == 6 )
  630.     {
  631.     change_objective_text("forts","OPTIONAL: Bring general to 6 forts.");
  632.     }
  633.     if( forts_visited == 7 )
  634.     {
  635.     change_objective_text("forts","OPTIONAL: Bring general to 5 forts.");
  636.     }
  637.     if( forts_visited == 8 )
  638.     {
  639.     change_objective_text("forts","OPTIONAL: Bring general to 4 forts.");
  640.     }
  641.     if( forts_visited == 9 )
  642.     {
  643.     change_objective_text("forts","OPTIONAL: Bring general to 3 forts.");
  644.     }
  645.     if( forts_visited == 10 )
  646.     {
  647.     change_objective_text("forts","OPTIONAL: Bring general to 2 forts.");
  648.     }
  649.     if( forts_visited == 11 )
  650.     {
  651.     change_objective_text("forts","OPTIONAL: Bring general to 1 more fort.");
  652.     }
  653.     if( forts_visited == 12 )
  654.     {
  655.       // all forts visited
  656.       disable_trigger( "the_general_is_down" );
  657.       objective_complete( "forts" );
  658.       popup_dialog("Comrade General, the troops have been amazed by the prowess of our General.  It has hightened the battlefield morale of all of our troops.");
  659.       gain_tech(1,"Nation-in-Arms");
  660.     }
  661.   }
  662.   trigger fort8 ( object_type_near(1,"Don Cossack",1, 289, 157,10) )
  663.   {
  664.     create_unit(1,295,157,"Red Guards Infantry",1);
  665.     ping(1,1,295,157);
  666.     forts_visited++;
  667.     add_flag (295,157);
  668.     if( forts_visited == 1 )
  669.     {
  670.     move_camera(295,157);
  671.     popup_dialog("Good work.  The General has raised the moral of the troops at this fortress.  It has been marked with a flag.");
  672.     change_objective_text("forts","OPTIONAL: Bring general to 11 forts.");
  673.     }
  674.     if( forts_visited == 2 )
  675.     {
  676.     change_objective_text("forts","OPTIONAL: Bring general to 10 forts.");
  677.     }
  678.     if( forts_visited == 3 )
  679.     {
  680.     change_objective_text("forts","OPTIONAL: Bring general to 9 forts.");
  681.     }
  682.     if( forts_visited == 4 )
  683.     {
  684.     change_objective_text("forts","OPTIONAL: Bring general to 8 forts.");
  685.     }
  686.     if( forts_visited == 5 )
  687.     {
  688.     change_objective_text("forts","OPTIONAL: Bring general to 7 forts.");
  689.     }
  690.     if( forts_visited == 6 )
  691.     {
  692.     change_objective_text("forts","OPTIONAL: Bring general to 6 forts.");
  693.     }
  694.     if( forts_visited == 7 )
  695.     {
  696.     change_objective_text("forts","OPTIONAL: Bring general to 5 forts.");
  697.     }
  698.     if( forts_visited == 8 )
  699.     {
  700.     change_objective_text("forts","OPTIONAL: Bring general to 4 forts.");
  701.     }
  702.     if( forts_visited == 9 )
  703.     {
  704.     change_objective_text("forts","OPTIONAL: Bring general to 3 forts.");
  705.     }
  706.     if( forts_visited == 10 )
  707.     {
  708.     change_objective_text("forts","OPTIONAL: Bring general to 2 forts.");
  709.     }
  710.     if( forts_visited == 11 )
  711.     {
  712.     change_objective_text("forts","OPTIONAL: Bring general to 1 more fort.");
  713.     }
  714.     if( forts_visited == 12 )
  715.     {
  716.       // all forts visited
  717.       disable_trigger( "the_general_is_down" );
  718.       objective_complete( "forts" );
  719.       popup_dialog("Comrade General, the troops have been amazed by the prowess of our General.  It has hightened the battlefield morale of all of our troops.");
  720.       gain_tech(1,"Nation-in-Arms");
  721.     }
  722.   }
  723.   trigger fort9 ( object_type_near(1,"Don Cossack",1, 291, 220,10) )
  724.   {
  725.     create_unit(1,299,222,"Red Guards Infantry",1);
  726.     ping(1,1,299,222);
  727.     forts_visited++;
  728.     add_flag(299,222);
  729.     if( forts_visited == 1 )
  730.     {
  731.     move_camera(299,222);
  732.     popup_dialog("Good work.  The General has raised the moral of the troops at this fortress.  It has been marked with a flag.");
  733.     change_objective_text("forts","OPTIONAL: Bring general to 11 forts.");
  734.     }
  735.     if( forts_visited == 2 )
  736.     {
  737.     change_objective_text("forts","OPTIONAL: Bring general to 10 forts.");
  738.     }
  739.     if( forts_visited == 3 )
  740.     {
  741.     change_objective_text("forts","OPTIONAL: Bring general to 9 forts.");
  742.     }
  743.     if( forts_visited == 4 )
  744.     {
  745.     change_objective_text("forts","OPTIONAL: Bring general to 8 forts.");
  746.     }
  747.     if( forts_visited == 5 )
  748.     {
  749.     change_objective_text("forts","OPTIONAL: Bring general to 7 forts.");
  750.     }
  751.     if( forts_visited == 6 )
  752.     {
  753.     change_objective_text("forts","OPTIONAL: Bring general to 6 forts.");
  754.     }
  755.     if( forts_visited == 7 )
  756.     {
  757.     change_objective_text("forts","OPTIONAL: Bring general to 5 forts.");
  758.     }
  759.     if( forts_visited == 8 )
  760.     {
  761.     change_objective_text("forts","OPTIONAL: Bring general to 4 forts.");
  762.     }
  763.     if( forts_visited == 9 )
  764.     {
  765.     change_objective_text("forts","OPTIONAL: Bring general to 3 forts.");
  766.     }
  767.     if( forts_visited == 10 )
  768.     {
  769.     change_objective_text("forts","OPTIONAL: Bring general to 2 forts.");
  770.     }
  771.     if( forts_visited == 11 )
  772.     {
  773.     change_objective_text("forts","OPTIONAL: Bring general to 1 more fort.");
  774.     }
  775.     if( forts_visited == 12 )
  776.     {
  777.       // all forts visited
  778.       disable_trigger( "the_general_is_down" );
  779.       objective_complete( "forts" );
  780.       popup_dialog("Comrade General, the troops have been amazed by the prowess of our General.  It has hightened the battlefield morale of all of our troops.");
  781.       gain_tech(1,"Nation-in-Arms");
  782.     }
  783.   }
  784.   trigger fort10 ( object_type_near(1,"Don Cossack",1, 277, 255,10) )
  785.   {
  786.     create_unit(1,285,258,"Red Guards Infantry",1);
  787.     ping(1,1,285,258);
  788.     forts_visited++;
  789.     add_flag(285,258);
  790.     if( forts_visited == 1 )
  791.     {
  792.     move_camera(285,258);
  793.     popup_dialog("Good work.  The General has raised the moral of the troops at this fortress.  It has been marked with a flag.");
  794.     change_objective_text("forts","OPTIONAL: Bring general to 11 forts.");
  795.     }
  796.     if( forts_visited == 2 )
  797.     {
  798.     change_objective_text("forts","OPTIONAL: Bring general to 10 forts.");
  799.     }
  800.     if( forts_visited == 3 )
  801.     {
  802.     change_objective_text("forts","OPTIONAL: Bring general to 9 forts.");
  803.     }
  804.     if( forts_visited == 4 )
  805.     {
  806.     change_objective_text("forts","OPTIONAL: Bring general to 8 forts.");
  807.     }
  808.     if( forts_visited == 5 )
  809.     {
  810.     change_objective_text("forts","OPTIONAL: Bring general to 7 forts.");
  811.     }
  812.     if( forts_visited == 6 )
  813.     {
  814.     change_objective_text("forts","OPTIONAL: Bring general to 6 forts.");
  815.     }
  816.     if( forts_visited == 7 )
  817.     {
  818.     change_objective_text("forts","OPTIONAL: Bring general to 5 forts.");
  819.     }
  820.     if( forts_visited == 8 )
  821.     {
  822.     change_objective_text("forts","OPTIONAL: Bring general to 4 forts.");
  823.     }
  824.     if( forts_visited == 9 )
  825.     {
  826.     change_objective_text("forts","OPTIONAL: Bring general to 3 forts.");
  827.     }
  828.     if( forts_visited == 10 )
  829.     {
  830.     change_objective_text("forts","OPTIONAL: Bring general to 2 forts.");
  831.     }
  832.     if( forts_visited == 11 )
  833.     {
  834.     change_objective_text("forts","OPTIONAL: Bring general to 1 more fort.");
  835.     }
  836.     if( forts_visited == 12 )
  837.     {
  838.       // all forts visited
  839.       disable_trigger( "the_general_is_down" );
  840.       objective_complete( "forts" );
  841.       popup_dialog("Comrade General, the troops have been amazed by the prowess of our General.  It has hightened the battlefield morale of all of our troops.");
  842.       gain_tech(1,"Nation-in-Arms");
  843.     }
  844.   }
  845.   trigger fort11 ( object_type_near(1,"Don Cossack",1, 247, 283,10) )
  846.   {
  847.     create_unit(1,258,284,"Red Guards Infantry",1);
  848.     ping(1,1,258,284);
  849.     forts_visited++;
  850.     add_flag(258,284);
  851.     if( forts_visited == 1 )
  852.     {
  853.     move_camera(258,284);
  854.     popup_dialog("Good work.  The General has raised the moral of the troops at this fortress.  It has been marked with a flag.");
  855.     change_objective_text("forts","OPTIONAL: Bring general to 11 forts.");
  856.     }
  857.     if( forts_visited == 2 )
  858.     {
  859.     change_objective_text("forts","OPTIONAL: Bring general to 10 forts.");
  860.     }
  861.     if( forts_visited == 3 )
  862.     {
  863.     change_objective_text("forts","OPTIONAL: Bring general to 9 forts.");
  864.     }
  865.     if( forts_visited == 4 )
  866.     {
  867.     change_objective_text("forts","OPTIONAL: Bring general to 8 forts.");
  868.     }
  869.     if( forts_visited == 5 )
  870.     {
  871.     change_objective_text("forts","OPTIONAL: Bring general to 7 forts.");
  872.     }
  873.     if( forts_visited == 6 )
  874.     {
  875.     change_objective_text("forts","OPTIONAL: Bring general to 6 forts.");
  876.     }
  877.     if( forts_visited == 7 )
  878.     {
  879.     change_objective_text("forts","OPTIONAL: Bring general to 5 forts.");
  880.     }
  881.     if( forts_visited == 8 )
  882.     {
  883.     change_objective_text("forts","OPTIONAL: Bring general to 4 forts.");
  884.     }
  885.     if( forts_visited == 9 )
  886.     {
  887.     change_objective_text("forts","OPTIONAL: Bring general to 3 forts.");
  888.     }
  889.     if( forts_visited == 10 )
  890.     {
  891.     change_objective_text("forts","OPTIONAL: Bring general to 2 forts.");
  892.     }
  893.     if( forts_visited == 11 )
  894.     {
  895.     change_objective_text("forts","OPTIONAL: Bring general to 1 more fort.");
  896.     }
  897.     if( forts_visited == 12 )
  898.     {
  899.       // all forts visited
  900.       disable_trigger( "the_general_is_down" );
  901.       objective_complete( "forts" );
  902.       popup_dialog("Comrade General, the troops have been amazed by the prowess of our General.  It has hightened the battlefield morale of all of our troops.");
  903.       gain_tech(1,"Nation-in-Arms");
  904.     }
  905.   }
  906.   trigger fort12 ( object_type_near(1,"Don Cossack",1, 248, 117,10) )
  907.   {
  908.     create_unit(1,254,117,"Red Guards Infantry",1);
  909.     ping(1,1,254,117);
  910.     forts_visited++;
  911.     add_flag(254,117);
  912.     if( forts_visited == 1 )
  913.     {
  914.     popup_dialog("Good work.  The General has raised the moral of the troops at this fortress.  It has been marked with a flag.");
  915.     change_objective_text("forts","OPTIONAL: Bring general to 11 forts.");
  916.     }
  917.     if( forts_visited == 2 )
  918.     {
  919.     change_objective_text("forts","OPTIONAL: Bring general to 10 forts.");
  920.     }
  921.     if( forts_visited == 3 )
  922.     {
  923.     change_objective_text("forts","OPTIONAL: Bring general to 9 forts.");
  924.     }
  925.     if( forts_visited == 4 )
  926.     {
  927.     change_objective_text("forts","OPTIONAL: Bring general to 8 forts.");
  928.     }
  929.     if( forts_visited == 5 )
  930.     {
  931.     change_objective_text("forts","OPTIONAL: Bring general to 7 forts.");
  932.     }
  933.     if( forts_visited == 6 )
  934.     {
  935.     change_objective_text("forts","OPTIONAL: Bring general to 6 forts.");
  936.     }
  937.     if( forts_visited == 7 )
  938.     {
  939.     change_objective_text("forts","OPTIONAL: Bring general to 5 forts.");
  940.     }
  941.     if( forts_visited == 8 )
  942.     {
  943.     change_objective_text("forts","OPTIONAL: Bring general to 4 forts.");
  944.     }
  945.     if( forts_visited == 9 )
  946.     {
  947.     change_objective_text("forts","OPTIONAL: Bring general to 3 forts.");
  948.     }
  949.     if( forts_visited == 10 )
  950.     {
  951.     change_objective_text("forts","OPTIONAL: Bring general to 2 forts.");
  952.     }
  953.     if( forts_visited == 11 )
  954.     {
  955.     change_objective_text("forts","OPTIONAL: Bring general to 1 more fort.");
  956.     }
  957.     if( forts_visited == 12 )
  958.     {
  959.       // all forts visited
  960.       disable_trigger( "the_general_is_down" );
  961.       objective_complete( "forts" );
  962.       popup_dialog("Comrade General, the troops have been amazed by the prowess of our General.  It has hightened the battlefield morale of all of our troops.");
  963.       gain_tech(1,"Nation-in-Arms");
  964.     }
  965.   }
  966.       
  967.   // explain the factory thing
  968.   
  969.   trigger factory_quest ( timer_expired( "packinfo" ) )
  970.   {
  971.     move_camera(221,172);
  972.     popup_dialog("To pack a factory, simply raze the building.  By default you can press the DELETE key on a selected building.");
  973.     move_camera(173,26);
  974.     add_flag(173,26);
  975.     popup_dialog("Move the packed factory to this location to safely evacuate the factory.");
  976.   }
  977.  
  978. // factories ID 2013-2022
  979.  
  980.   trigger pack_factory2013 ( building_destroyed(1,2013) )
  981.   {
  982.     create_unit(1,221,172,"Supply Wagon",1);
  983.   }
  984.   trigger pack_factory2014 ( building_destroyed(1,2014) )
  985.   {
  986.     create_unit(1,221,178,"Supply Wagon",1);
  987.   }
  988.   trigger pack_factory2015 ( building_destroyed(1,2015) )
  989.   {
  990.     create_unit(1,221,183,"Supply Wagon",1);
  991.   }
  992.   trigger pack_factory2016 ( building_destroyed(1,2016) )
  993.   {
  994.     create_unit(1,221,189,"Supply Wagon",1);
  995.   }
  996.   trigger pack_factory2017 ( building_destroyed(1,2017) )
  997.   {
  998.     create_unit(1,221,195,"Supply Wagon",1);
  999.   }
  1000.   trigger pack_factory2018 ( building_destroyed(1,2018) )
  1001.   {
  1002.     create_unit(1,229,172,"Supply Wagon",1);
  1003.   }
  1004.   trigger pack_factory2019 ( building_destroyed(1,2019) )
  1005.   {
  1006.     create_unit(1,229,178,"Supply Wagon",1);
  1007.   }
  1008.   trigger pack_factory2020 ( building_destroyed(1,2020) )
  1009.   {
  1010.     create_unit(1,229,183,"Supply Wagon",1);
  1011.   }
  1012.   trigger pack_factory2021 ( building_destroyed(1,2021) )
  1013.   {
  1014.     create_unit(1,229,189,"Supply Wagon",1);
  1015.   }
  1016.   trigger pack_factory2022 ( building_destroyed(1,2022) )
  1017.   {
  1018.     create_unit(1,229,195,"Supply Wagon",1);
  1019.   }
  1020.   trigger pack_factory2023 ( building_destroyed(1,2023) )
  1021.   {
  1022.     create_unit(1,195,178,"Supply Wagon",1);
  1023.   }
  1024.   trigger pack_factory2024 ( building_destroyed(1,2024) )
  1025.   {
  1026.     create_unit(1,189,178,"Supply Wagon",1);
  1027.   }
  1028.   trigger pack_factory2025 ( building_destroyed(1,2025) )
  1029.   {
  1030.     create_unit(1,170,187,"Supply Wagon",1);
  1031.   }
  1032.   trigger pack_factory2026 ( building_destroyed(1,2026) )
  1033.   {
  1034.     create_unit(1,170,192,"Supply Wagon",1);
  1035.   }
  1036.   
  1037.   // player brings a Packed factory to the rally point
  1038.   trigger first_rally_msg ( object_type_near(1,"Supply Wagon",1,168,15,15) )
  1039.   {
  1040.     popup_dialog("Good, you have packed up at least one factory and brought it to the rally point.  Keep going.");
  1041.     move_camera(173,26);
  1042.     
  1043.   }
  1044.   trigger factory_rally_point ( object_type_near(1,"Supply Wagon",1,168,15,15) )
  1045.   {
  1046.     int rallyID;
  1047.     rallyID = find_unit( 1, "Supply Wagon" );
  1048.     for( i = 0; i < num_type( 1, "Supply Wagon" ); i++ ) {
  1049.       if( object_near( 1, rallyID, 168, 15, 15 ) ) {
  1050.         kill_unit_anim( 1, rallyID, 1);
  1051.         wagons_saved = wagons_saved + 1;
  1052.         break;
  1053.       }
  1054.     }
  1055.     if( wagons_saved == 1 )
  1056.     {
  1057.     change_objective_text("move","Pack 9 Factories and move them to the East");
  1058.     }
  1059.     else if ( wagons_saved == 2 )
  1060.     {
  1061.     change_objective_text("move","Pack 8 Factories and move them to the East");
  1062.     }
  1063.     else if ( wagons_saved == 3 )
  1064.     {
  1065.     change_objective_text("move","Pack 7 Factories and move them to the East");
  1066.     }
  1067.     else if ( wagons_saved == 4 )
  1068.     {
  1069.     change_objective_text("move","Pack 6 Factories and move them to the East");
  1070.     }
  1071.     else if ( wagons_saved == 5 )
  1072.     {
  1073.     change_objective_text("move","Pack 5 Factories and move them to the East");
  1074.     }
  1075.     else if ( wagons_saved == 6 )
  1076.     {
  1077.     change_objective_text("move","Pack 4 Factories and move them to the East");
  1078.     }
  1079.     else if ( wagons_saved == 7 )
  1080.     {
  1081.     change_objective_text("move","Pack 3 Factories and move them to the East");
  1082.     }
  1083.     else if ( wagons_saved == 8 )
  1084.     {
  1085.     change_objective_text("move","Pack 2 Factories and move them to the East");
  1086.     }
  1087.     else if ( wagons_saved == 9 )
  1088.     {
  1089.     change_objective_text("move","Pack 1 Factories and move them to the East");
  1090.     }
  1091.     else
  1092.     {
  1093.       // eh do something else
  1094.     }
  1095.     enable_trigger( "factory_rally_point" );
  1096.   }
  1097.   
  1098.   // all the factories have been saved
  1099.   trigger all_factories_saved ( wagons_saved >= 10  )
  1100.   {
  1101.       popup_dialog("Excellent, comrade General.  We have moved most of the city's infrastructure safely away from the Germans.");
  1102.       objective_complete( "move" );
  1103.       
  1104.       if ( time_ran_out == 0 )
  1105.       {      
  1106.         popup_dialog("However, Moscow has other plans for us now.  The capital needs more time to prepare its defenses so you will have to hold up the Germans for another 25 minutes.  Put your greatest effort into it, commander.");
  1107.         popup_dialog("NEW OBJECTIVE: Survive for 25 minutes.");
  1108.         add_objective( "Survive for 25 minutes", "survive", "null.wav");
  1109.       
  1110.         set_timer( "victimer", 1500 );
  1111.         set_timer( "vicupdater", 60 );
  1112.         set_timer( "flood", 600 );
  1113.         set_timer( "overrun", 900 );
  1114.         enable_trigger( "attack_flood" );
  1115.         enable_trigger( "the_overrun" );
  1116.         disable_trigger( "time_is_up_attack" );
  1117.       }
  1118.   }
  1119.   
  1120.   trigger vic_updater ( timer_expired( "vicupdater" ) )
  1121.   {
  1122.     initial_vic--;
  1123.     set_timer( "vicupdater", 60 );
  1124.     if ( initial_vic > 1 )
  1125.     {
  1126.         change_objective_text("survive", "Survive for " + initial_vic + " minutes");
  1127.     }
  1128.     else
  1129.     {
  1130.         change_objective_text("survive", "Survive for 1 minute");
  1131.     }
  1132.     enable_trigger( vic_updater );
  1133.   }
  1134.   
  1135.   trigger cause_victory ( timer_expired("victimer") )
  1136.   {
  1137.     if( wagons_saved >= 10 )
  1138.     {
  1139.       objective_complete( "survive" );
  1140.       popup_dialog("Comrade General, the situation here is untenniable.  The Germans have surrounded the army and are closing in on Kiev.  But General, your delaying actions have bought the motherland more time.  You are to board a plane as quickly as possible and report to Moscow.");
  1141.       popup_dialog("You are now ready for the fourth part of this campaign.  Please load the next scenario in the Red Front sequence.");
  1142.       victory( 1 );
  1143.     }
  1144.     else
  1145.     {
  1146.       remove_objective( "move" );
  1147.       remove_objective( "survive" );
  1148.       popup_dialog("You may have survived long enough to board a plane to Moscow, but the motherland is surely doomed with the industrial capacity of the Ukraine in German hands.  Stalin is expecting your resignation on his desk within the week.  Comrade General, you will most likely have time to consider your defeat in prison.");
  1149.       defeat( 1 );
  1150.     }
  1151.   }
  1152. }